From 495380a926600d38f05ad302bf053f69647d4435 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20H=C3=A4rdeman?= Date: Tue, 21 Oct 2025 22:03:29 +0200 Subject: [PATCH] luci-mod-network: remove customi18n() from dhcp.js MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The single user isn't really enough to warrant this function, so remove it to prepare for the following patches. Signed-off-by: David Härdeman --- .../luci-static/resources/view/network/dhcp.js | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js index e887b483c5..1175e3ecfc 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js @@ -235,16 +235,6 @@ return view.extend({ var has_dhcpv6 = L.hasSystemFeature('dnsmasq', 'dhcpv6') || L.hasSystemFeature('odhcpd'), m, s, o, ss, so; - let noi18nstrings = { - etc_ethers: '/etc/ethers', - }; - - function customi18n(template, values) { - if (!values) - values = noi18nstrings; - return template.replace(/\{(\w+)\}/g, (match, key) => values[key] || match); - }; - m = new form.Map('dhcp', _('DHCP')); s = m.section(form.TypedSection, 'dnsmasq'); @@ -375,9 +365,8 @@ return view.extend({ // Begin files s.taboption('files', form.Flag, 'readethers', - customi18n(_('Use {etc_ethers}') ), - customi18n(_('Read {etc_ethers} to configure the DHCP server.') ) - ); + _('Use %s').format('/etc/ethers'), + _('Read %s to configure the DHCP server.').format('/etc/ethers')); s.taboption('files', form.Value, 'leasefile', _('Lease file'), -- 2.30.2